package com.shiguiwu.springmybatis.javabase.thread;

import sun.misc.Unsafe;

import java.lang.reflect.Field;

/**
 * @description: Unsafe
 * @author: stone
 * @date: Created by 2021/7/3 21:06
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.thread
 */
public class UnsafeTests {

    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {
        Field field = Unsafe.class.getDeclaredField("theUnsafe");
        field.setAccessible(true);
        Unsafe unsafe = (Unsafe) field.get(null);
        System.out.println(unsafe);
    }
}
